/* function Fun(){
    this.a=100
    this.b=[1,2,3]
    //默认return undefined
}
console.log(new Fun()); */

/* function Fun(){
    this.a=100
    this.b=[1,2,3]
    return 100
}
console.log(new Fun()); */

function Fun() { //1.运行构造函数
    //2.创建空对象 {}
    //3.{}.__proto__=Fun.prototype
    this.a = 100 //4.构造函数this指向{}
    this.b = [1, 2, 3]
    return [] //5.return基本数据类型返回构造对象  return引用数据类型返回该引用数据类型
}
/* console.log(new Fun()); //new过程
Fun.prototype = {} */
var bianliang = new Fun()
console.log(bianliang);
/* bianliang.__proto__ = {}
console.log(typeof Fun.prototype); //原型是对象 */